package UpgradeXuanke;


class Information{
	String name;
	String ID;
	Course course;
	Information(String name){
		this.name = name;
	}
	public String getName() {
		return name;
	}
	public String getID() {
		return ID;
	}
	public String getCourse() {
		return course.name;
	}

}

class Student extends Information{
	Student(String name,String ID,Course couse) {
		super(name);
		this.name = name;
		this.ID = ID;
		course = couse;
		}
		
}

class Teacher extends Information{
	String sex;
	Teacher(String name,String ID,String sex,Course course){
		super(name);
		this.name = name;
		this.ID = ID;
		this.course = course;
	}
	public String getSex() {
		return sex;
	}
}

class Course extends Information{
	String place;
	String time;
	String cou_ID;
	public Course(String course,String cou_id,String cou_place,String cou_time) {
		super(course);
		course = course;
		cou_ID = cou_id;
		place = cou_place;
		time = cou_time;
	}
	public String getCou_ID() {
		return cou_ID;
	}
	public String getPlace() {
		return place;
	}
	public String getTime() {
		return time;
	}
		
}

class Dayin{
	Dayin(Course cou,Student stu,Teacher tea){
		System.out.println("学生姓名："+stu.getName());
		System.out.println("学生编号："+stu.getID());
		System.out.println("所选课程："+stu.getCourse());
		System.out.println("课程编号："+cou.getCou_ID());
		System.out.println("授课教师："+tea.getName());
		System.out.println("教师编号："+tea.getID());
		System.out.println("上课地点："+cou.getPlace());
		System.out.println("上课时间："+cou.getTime()+"\n");
	}
}

class Xuanke1{
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Course  cou1 = new Course("高等数学A","001","教202","8:00-9:40");
		Student stu1 = new Student("李欣","2021021672",cou1);
		Teacher tea1 = new Teacher("李明","2019000819","男",cou1);
		Dayin dy1 = new Dayin(cou1,stu1,tea1);
		Course  cou2 = new Course("Python","002","教403","15:30-17:10");
		Student stu2 = new Student("王丽","2018001923",cou2);
		Teacher tea2 = new Teacher("赵雪","2021021372","女",cou2);
		Dayin dy2 = new Dayin(cou2,stu2,tea2);
		Course  cou3 = new Course("C++","003","教303","10:00-11:40");
		Student stu3 = new Student("孙田","2021021826",cou3);
		Teacher tea3 = new Teacher("张天","2019000142","男",cou3);
		Dayin dy3 = new Dayin(cou3,stu3,tea3);
		Course  cou4 = new Course("课容量已满，无法选课！！！","","","");
		Student stu4 = new Student("吴毅","2021021538",cou4);
		Teacher tea4 = new Teacher("王齐","2019000142","男",cou4);
		Dayin dy4 = new Dayin(cou4,stu4,tea4);
	}
}

